All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.naming.NameClassPair

java.lang.Object
   |
   +----java.naming.NameClassPair

public class NameClassPair
extends Object
implements Serializable
A context consists of name-to-object bindings. The NameClassPair class represents the name and the class of the bound object. It consists of an atomic name and a string representing the package-qualified class name. Use subclassing for naming systems that generate contents of a name/class pair dynamically.


Variable Index

 o className
 o name

Constructor Index

 o NameClassPair(String, String)
Constructs an instance of a NameClassPair given its atomic name and class name.

Method Index

 o getClassName()
Retrieves the class name of the object bound to the name of this binding.
 o getName()
Retrieves the atomic name of this binding.
 o toString()
Generates the string representation of this name/class pair.

Variables

 o name
 protected String name
 o className
 protected String className

Constructors

 o NameClassPair
 public NameClassPair(String name,
                      String className)
Constructs an instance of a NameClassPair given its atomic name and class name.

Parameters:
name - The atomic name of the object.
className - The class name of the object bound to name.

Methods

 o getClassName
 public String getClassName()
Retrieves the class name of the object bound to the name of this binding. If a reference or some other indirect information is bound, return the class name of the object of the eventual object that will be returned by getObject().

Returns:
The class name of object bound.
 o getName
 public String getName()
Retrieves the atomic name of this binding.

Returns:
The atomic name of this binding.
 o toString
 public String toString()
Generates the string representation of this name/class pair. The string representation consists of the name and class name separated by a colon (':').

Returns:
The string representation of this name/class pair.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index